package com.example.justbuy.service.Impl;

import com.example.justbuy.mapper.OrderMapper;
import com.example.justbuy.pojo.Goods;
import com.example.justbuy.pojo.Order;
import com.example.justbuy.service.OrderMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrderMapperServiceImpl implements OrderMapperService {

    @Autowired
    private OrderMapper orderMapper;
    @Override
    public List<Order> getAllOfOrderByUserId(int userid) {
        return orderMapper.getAllOfOrderByUserId(userid);
    }

    @Override
    public List<Order> getPayOfOrderByUserId(Map map) {
        return orderMapper.getPayOfOrderByUserId(map);
    }


    @Override
    public int getTheGoodsOfOrderById(int id) {
        return orderMapper.getTheGoodsOfOrderById(id);
    }

    @Override
    public int getNumberOfOrderByState(String state) {
        return orderMapper.getNumberOfOrderByState(state);
    }

    @Override
    public int addNewOrderById(Map map) {
        return orderMapper.addNewOrderById(map);
    }

    @Override
    public List<Order> getTheOrderByUseridAndOrderId(Map map) {
        return orderMapper.getTheOrderByUseridAndOrderId(map);
    }

    @Override
    public Double getSumOfOrderByOrderAndUserId(Map map) {
        return orderMapper.getSumOfOrderByOrderAndUserId(map);
    }

    @Override
    public Goods getOneOfGoodsByGoodsId(int id) {
        return orderMapper.getOneOfGoodsByGoodsId(id);
    }

    @Override
    public int updateStateById(Map map) {
        return orderMapper.updateStateById(map);
    }

    @Override
    public int updateStateBypayId(Map map) {
        return orderMapper.updateStateBypayId(map);
    }

    @Override
    public int updatePayIdById(Map map) {
        return orderMapper.updatePayIdById(map);
    }

    @Override
    public Integer getSum0fOrderByState(Map map) {
        return orderMapper.getSum0fOrderByState(map);
    }

    @Override
    public int deleOrderByOrderId(String orderId) {
        return orderMapper.deleOrderByOrderId(orderId);
    }

    @Override
    public List<Order> getTheInfoOrder(Map map) {
        return orderMapper.getTheInfoOrder(map);
    }

    @Override
    public int updateStateById01(Map map) {
        return orderMapper.updateStateById01(map);
    }

    @Override
    public Order getById(int id) {
        return orderMapper.getById(id);
    }

    @Override
    public int updateaddressId(Map map) {
        return orderMapper.updateaddressId(map);
    }
}
